<?php

namespace app\api\controller\hotel;

use think\Hook;
use app\api\controller\hotel\Token;
use think\Exception;

/**
 * 获取数据
 */
class Group extends Base
{
    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    
    protected $domain = 'http://csckjt.sm8.fxscm.net/';
    protected $ent = 'ENTaek8';
    protected $username = 'admin';
    protected $password = '0000';
    
    

    public function _initialize()
    {
        parent::_initialize();
    }
    
    
    /**
     * 门店
     * 获取门店数据
     */
    public function getShop(){
        $this->table  = 'hotel_gyl_shop';
        $this->url = $this->domain .'cldpoint/getShop.do?';
        
        $this->request_data = ['ent'=>$this->ent,'username'=>$this->username,'password'=>$this->password];
        $flag = $this->commonDealData();
        if($flag)$this->success ('成功');
        else $this->error ('失败');
        
    }
    
    /**
     * 中心
     * 获取中心机构数据
     */
    public function getRdc(){
        $this->table  = 'hotel_gyl_rdc';
        $this->url = $this->domain .'cldpoint/getRdc.do?';
        
        $this->request_data = ['ent'=>$this->ent,'username'=>$this->username,'password'=>$this->password];
        $flag = $this->commonDealData();
        if($flag === TRUE)$this->success ('成功');
        else $this->error ($flag);
        
    }
    
    /**
     * 仓库
     * 获取仓库数据
     */
    public function getOrganStore(){
        $this->table  = 'hotel_gyl_organstore';
        $this->url = $this->domain .'cldpoint/getOrganStore.do?';
        
        $this->request_data = ['ent'=>$this->ent,'username'=>$this->username,'password'=>$this->password];
        $flag = $this->commonDealData();
        if($flag === TRUE)$this->success ('成功');
        else $this->error ($flag);
        
    }
    
    
    
    
    
    
    
    
    
    
   
       

    
}
